//package com.example.myapplication;
//
//import android.content.Intent;
//import android.os.Bundle;
//import android.view.View;
//import android.widget.Button;
//import android.widget.TextView;
//
//import androidx.activity.EdgeToEdge;
//import androidx.activity.result.ActivityResult;
//import androidx.activity.result.ActivityResultCallback;
//import androidx.activity.result.ActivityResultLauncher;
//import androidx.activity.result.contract.ActivityResultContracts;
//import androidx.appcompat.app.AppCompatActivity;
//import androidx.core.graphics.Insets;
//import androidx.core.view.ViewCompat;
//import androidx.core.view.WindowInsetsCompat;
//
//public class MainActivity extends AppCompatActivity /*implements View.OnClickListener*/ /*implements CompoundButton.OnCheckedChangeListener*/ {
////    private Button btn01, btn02, btn03;
////
////    private RadioGroup radioGroup;
////    private TextView textView, textView2;
////    private CheckBox checkBox, checkBox2, checkBox3, checkBox4;
////    private ArrayList arrayList = new ArrayList();
////
////    @Override
////    protected void onCreate(Bundle savedInstanceState) {
////        super.onCreate(savedInstanceState);
////        EdgeToEdge.enable(this);
//////        setContentView(R.layout.activity_main);
//////        ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
//////            Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
//////            v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
//////            return insets;
//////        });
////
//////        setContentView(R.layout.zzzzz2025091601);
//////        setContentView(R.layout.zzzzz2025091602);
////
//////        setContentView(R.layout.zzzzz2025092301);
//////        setContentView(R.layout.zzzzz2025092302);
//////        setContentView(R.layout.zzzzz2025092303);
////
//////        btn01 = findViewById(R.id.zzzzz2025092303002);
//////        btn02 = findViewById(R.id.zzzzz2025092303003);
//////        btn02.setOnClickListener(new View.OnClickListener() {
//////            @Override
//////            public void onClick(View v) {
//////                click2(v);
//////            }
//////        });
//////        btn02.setOnClickListener(this);
//////        btn03 = findViewById(R.id.zzzzz2025092303004);
//////        btn03.setOnClickListener(this);
////
////
////        setContentView(R.layout.zzzzz2025093001);
////        ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.zzzzz2025093001001), (v, insets) -> {
////            return insets;
////        });
////        radioGroup = findViewById(R.id.zzzzz2025093001002);
////        textView = findViewById(R.id.zzzzz2025093001003);
////        radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
////            @Override
////            public void onCheckedChanged(@NonNull RadioGroup group, int checkedId) {
////                if (checkedId == R.id.zzzzz2025093001004) {
////                    textView.setText("aaaaaaaaaaa");
////                } else if (checkedId == R.id.zzzzz2025093001005) {
////                    textView.setText("wwwwwwwwwww");
////                }
////            }
////        });
////        textView2 = findViewById(R.id.zzzzz2025093001006);
////        checkBox = findViewById(R.id.zzzzz2025093001007);
////        checkBox2 = findViewById(R.id.zzzzz2025093001008);
////        checkBox3 = findViewById(R.id.zzzzz2025093001009);
////        checkBox4 = findViewById(R.id.zzzzz2025093001010);
////        arrayList.add(0, 0);
////        arrayList.add(1, 0);
////        arrayList.add(2, 0);
////        arrayList.add(3, 0);
////        checkBox.setOnCheckedChangeListener(this);
////        checkBox2.setOnCheckedChangeListener(this);
////        checkBox3.setOnCheckedChangeListener(this);
////        checkBox4.setOnCheckedChangeListener(this);
////    }
////
////    @Override
////    public void onCheckedChanged(@NonNull CompoundButton buttonView, boolean isChecked) {
////        if (buttonView.getId() == R.id.zzzzz2025093001007) {
////            arrayList.set(0, isChecked ? 1 : 0);
////        }
////        if (buttonView.getId() == R.id.zzzzz2025093001008) {
////            arrayList.set(1, isChecked ? 1 : 0);
////        }
////        if (buttonView.getId() == R.id.zzzzz2025093001009) {
////            arrayList.set(2, isChecked ? 1 : 0);
////        }
////        if (buttonView.getId() == R.id.zzzzz2025093001010) {
////            arrayList.set(3, isChecked ? 1 : 0);
////        }
////        setContextView2Content();
////    }
////
////    private void setContextView2Content() {
////        String s = "";
////        if (arrayList.get(0).equals(1)) {
////            s += "-足球";
////        }
////        if (arrayList.get(1).equals(1)) {
////            s += "-篮球";
////        }
////        if (arrayList.get(2).equals(1)) {
////            s += "-台球";
////        }
////        if (arrayList.get(3).equals(1)) {
////            s += "-保龄球";
////        }
////        textView2.setText(s);
////    }
////
//
//    /// /    public void click1(View view) {
//    /// /        btn01.setText("按钮1- " + String.valueOf(new Date().getTime()));
//    /// /    }
//    /// /
//    /// /    private void click2(View view) {
//    /// /        btn02.setText("按钮2- " + String.valueOf(new Date().getTime()));
//    /// /    }
//    /// /
//    /// /    @Override
//    /// /    public void onClick(View v) {
//    /// /        if (v.getId() == R.id.zzzzz2025092303003) {
//    /// /            btn02.setText("按钮2- " + String.valueOf(new Date().getTime()));
//    /// /        }
//    /// /        if (v.getId() == R.id.zzzzz2025092303004) {
//    /// /            btn03.setText("按钮3- " + String.valueOf(new Date().getTime()));
//    /// /        }
//    /// /    }
//
////    private EditText etName;
////    private EditText etEmail;
////    private EditText etPassword;
////    private RadioGroup rgGender;
////    private CheckBox cbSing;
////    private CheckBox cbDance;
////    private CheckBox cbRead;
////    private Button btnSubmit;
////    private String rg = "";
////    private ArrayList arrayList = new ArrayList<Boolean>();
////
////    @Override
////    protected void onCreate(@Nullable Bundle savedInstanceState) {
////        super.onCreate(savedInstanceState);
////        setContentView(R.layout.zzzzz2025093002);
////
////        etName = findViewById(R.id.zzzzz2025093002009);
////        etEmail = findViewById(R.id.zzzzz2025093002010);
////        etPassword = findViewById(R.id.zzzzz2025093002011);
////        rgGender = findViewById(R.id.zzzzz2025093002002);
////        cbSing = findViewById(R.id.zzzzz2025093002005);
////        cbDance = findViewById(R.id.zzzzz2025093002006);
////        cbRead = findViewById(R.id.zzzzz2025093002007);
////        btnSubmit = findViewById(R.id.zzzzz2025093002008);
////
////        rg = "男";
////        arrayList.add(false);
////        arrayList.add(false);
////        arrayList.add(false);
////
////        rgGender.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
////            @Override
////            public void onCheckedChanged(@NonNull RadioGroup group, int checkedId) {
////                if (checkedId == R.id.zzzzz2025093002003) {
////                    rg = "男";
////                } else {
////                    rg = "女";
////                }
////            }
////        });
////
////        CompoundButton.OnCheckedChangeListener onCheckedChangeListener = new CompoundButton.OnCheckedChangeListener() {
////            @Override
////            public void onCheckedChanged(@NonNull CompoundButton buttonView, boolean isChecked) {
////                if (buttonView.getId() == R.id.zzzzz2025093002005) {
////                    arrayList.set(0, isChecked);
////                }
////                if (buttonView.getId() == R.id.zzzzz2025093002006) {
////                    arrayList.set(1, isChecked);
////                }
////                if (buttonView.getId() == R.id.zzzzz2025093002007) {
////                    arrayList.set(2, isChecked);
////                }
////            }
////        };
////
////        cbSing.setOnCheckedChangeListener(onCheckedChangeListener);
////        cbDance.setOnCheckedChangeListener(onCheckedChangeListener);
////        cbRead.setOnCheckedChangeListener(onCheckedChangeListener);
////
////        btnSubmit.setOnClickListener(new View.OnClickListener() {
////            @Override
////            public void onClick(View v) {
////                if (etName.getText().toString().trim().isEmpty()) {
////                    Toast.makeText(MainActivity.this, "名字不能为空", Toast.LENGTH_SHORT).show();
////                    return;
////                }
////                if (etEmail.getText().toString().trim().isEmpty()) {
////                    Toast.makeText(MainActivity.this, "邮箱不能为空", Toast.LENGTH_SHORT).show();
////                    return;
////                }
////                if (etPassword.getText().toString().trim().isEmpty()) {
////                    Toast.makeText(MainActivity.this, "密码不能为空", Toast.LENGTH_SHORT).show();
////                    return;
////                }
////                String str = "";
////                str += "用户名为";
////                str += etName.getText().toString().trim();
////                str += "，";
////                str += "邮箱为";
////                str += etEmail.getText().toString().trim();
////                str += "，";
////                str += "密码为";
////                str += etPassword.getText().toString().trim();
////                str += "，";
////                str += "性别为";
////                str += rg;
////                str += "，";
////                str += "兴趣爱好为";
////                if (arrayList.get(0).equals(true)) {
////                    str += "唱歌";
////                }
////                if (arrayList.get(1).equals(true)) {
////                    str += "跳舞";
////                }
////                if (arrayList.get(2).equals(true)) {
////                    str += "读书";
////                }
////                str += "。";
////                Toast.makeText(MainActivity.this, str, Toast.LENGTH_SHORT).show();
////            }
////        });
////    }
//
////    private String[] names = {"手撕面包", "华夫饼", "小麻花", "每日坚果", "盐焗鸡蛋",
////            "原味肉松饼"};
////    private String[] prices = {"￥32.90", "￥36.90", "￥18.80", "￥19.90",
////            "￥30.70", "￥34.90"};
////    private String[] shops = {"良品铺子旗舰店", "百草味旗舰店", "比比赞旗舰店",
////            "憨豆熊旗舰店", "无穷旗舰店", "良品铺子旗舰店"};
////    private int[] pictures = {R.drawable.z2025101401_tear_bread, R.drawable.z2025101401_waffle,
////            R.drawable.z2025101401_dough_twist, R.drawable.z2025101401_daily_nuts,
////            R.drawable.z2025101401_salt_baked_eggs, R.drawable.z2025101401_meat_floss};
////
////    @Override
////    protected void onCreate(@Nullable Bundle savedInstanceState) {
////        super.onCreate(savedInstanceState);
////        setContentView(R.layout.zzzzz2025101401);
////
////        ListView listView = findViewById(R.id.zzzzz2025101401002);
////        MYBaseAdpter myBaseAdpter = new MYBaseAdpter(this);
////        listView.setAdapter(myBaseAdpter);
////    }
////
////    class MYBaseAdpter extends BaseAdapter {
////        private Context mContext;
////
////        public MYBaseAdpter(Context context) {
////            this.mContext = context;
////        }
////
////        @Override
////        public int getCount() {
////            return names.length;
////        }
////
////        @Override
////        public Object getItem(int position) {
////            return names[position];
////        }
////
////        @Override
////        public long getItemId(int position) {
////            return position;
////        }
////
////        @Override
////        public View getView(int position, View convertView, ViewGroup parent) {
////            ViewHolder holder = null;
////            if (convertView == null) {
////                convertView = LayoutInflater.from(mContext).inflate(R.layout.zzzzz2025101402list_item, null);
////                holder = new ViewHolder();
////                holder.textViewName = convertView.findViewById(R.id.zzzzz2025101402list_item_name);
////                holder.textViewPrice = convertView.findViewById(R.id.zzzzz2025101402list_item_price);
////                holder.textViewShop = convertView.findViewById(R.id.zzzzz2025101402list_item_shop);
////                holder.imageView = convertView.findViewById(R.id.zzzzz2025101402list_item_iv_img);
////                convertView.setTag(holder);
////            } else {
////                holder = (ViewHolder) convertView.getTag();
////            }
////            holder.textViewName.setText(names[position]);
////            holder.textViewPrice.setText(prices[position]);
////            holder.textViewShop.setText(shops[position]);
////            holder.imageView.setBackgroundResource(pictures[position]);
////            return convertView;
////        }
////    }
////
////    class ViewHolder {
////        TextView textViewName, textViewPrice, textViewShop;
////        ImageView imageView;
////    }
//
////    private RecyclerView recyclerViewLeft, recyclerViewRight;
////
////    // 图片资源数组
////    private int[] allImages = {
////            R.drawable.z2025101403_photo_1,
////            R.drawable.z2025101403_photo_2,
////            R.drawable.z2025101403_photo_3,
////            R.drawable.z2025101403_photo_4,
////            R.drawable.z2025101403_photo_5,
////            R.drawable.z2025101403_photo_6,
////            R.drawable.z2025101403_photo_7,
////            R.drawable.z2025101403_photo_8,
////            R.drawable.z2025101403_photo_9,
////            R.drawable.z2025101403_photo_10,
////            R.drawable.z2025101403_photo_11,
////            R.drawable.z2025101403_photo_12,
////            R.drawable.z2025101403_photo_13
////    };
////
////    @Override
////    protected void onCreate(Bundle savedInstanceState) {
////        super.onCreate(savedInstanceState);
////        setContentView(R.layout.zzzzz2025101403);
////
////        initViews();
////        distributeImages();
////    }
////
////    private void initViews() {
////        recyclerViewLeft = findViewById(R.id.zzzzz2025101403002recyclerViewLeft);
////        recyclerViewRight = findViewById(R.id.zzzzz2025101403003recyclerViewRight);
////
////        // 设置布局管理器
////        recyclerViewLeft.setLayoutManager(new LinearLayoutManager(this));
////        recyclerViewRight.setLayoutManager(new LinearLayoutManager(this));
////    }
////
////    private void distributeImages() {
////        // 将图片分配到两列（简单的奇偶分配）
////        int[] leftImages = new int[7]; // 左列7张
////        int[] rightImages = new int[6]; // 右列6张
////
////        int leftIndex = 0, rightIndex = 0;
////        for (int i = 0; i < allImages.length; i++) {
////            if (i % 2 == 0) {
////                leftImages[leftIndex++] = allImages[i];
////            } else {
////                rightImages[rightIndex++] = allImages[i];
////            }
////        }
////
////        // 设置适配器
////        recyclerViewLeft.setAdapter(new SimpleImageAdapter(leftImages));
////        recyclerViewRight.setAdapter(new SimpleImageAdapter(rightImages));
////    }
////
////    // 内嵌的简单适配器
////    private static class SimpleImageAdapter extends RecyclerView.Adapter<SimpleImageAdapter.ViewHolder> {
////        private int[] images;
////
////        SimpleImageAdapter(int[] images) {
////            this.images = images;
////        }
////
////        @Override
////        public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
////            ImageView imageView = new ImageView(parent.getContext());
////            imageView.setLayoutParams(new ViewGroup.LayoutParams(
////                    ViewGroup.LayoutParams.MATCH_PARENT,
////                    ViewGroup.LayoutParams.WRAP_CONTENT));
////            imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
////            imageView.setAdjustViewBounds(true);
////            return new ViewHolder(imageView);
////        }
////
////        @Override
////        public void onBindViewHolder(ViewHolder holder, int position) {
////            holder.imageView.setImageResource(images[position]);
////        }
////
////        @Override
////        public int getItemCount() {
////            return images.length;
////        }
////
////        static class ViewHolder extends RecyclerView.ViewHolder {
////            ImageView imageView;
////
////            ViewHolder(ImageView imageView) {
////                super(imageView);
////                this.imageView = imageView;
////            }
////        }
////    }
//
//
//    private Button btn_peach;
//    private TextView tv_count;
//    private int totalCount = 0;
//
//    @Override
//    protected void onCreate(Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//        EdgeToEdge.enable(this);
//        setContentView(R.layout.zzzzz2025102301_activity_main);
//        ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.zzzzz2025102301001main), (v, insets) -> {
//            Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
//            v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
//            return insets;
//        });
//        init();
//    }
//    private void init() {
//        btn_peach = findViewById(R.id.zzzzz2025102301003btn_peach);
//        tv_count = findViewById(R.id.zzzzz2025102301005tv_count);
//        ActivityResultLauncher launcher = registerForActivityResult(new ActivityResultContracts.StartActivityForResult(),new ActivityResultCallback<ActivityResult>() {
//            @Override
//            public void onActivityResult(ActivityResult result) {
//                Intent data = result.getData();
//                int count = data.getIntExtra("count",0);
//                totalCount += count;
//                tv_count.setText("摘到" + totalCount + "个");
//            }
//        });
//        btn_peach.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                Intent intent = new Intent(MainActivity.this, PeachActivity.class);
//                launcher.launch(intent);
//
//            }
//        });
//    }
//}
